package cn.well.cloud.modular.model;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 课程详情
 * </p>
 *
 * @author jiawei
 * @since 2020-06-11
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("biz_course_info")
@ApiModel(value="CourseInfo对象", description="课程详情")
public class CourseInfo extends Model<CourseInfo> {

    private static final long serialVersionUID=1L;

    @ApiModelProperty(value = "课程id")
    @TableId(value = "course_id", type = IdType.ID_WORKER)
    private Long courseId;

    @ApiModelProperty(value = "课程链接")
    @TableField("course_url")
    private String courseUrl;

    @ApiModelProperty(value = "课程名称")
    @TableField("course_name")
    private String courseName;

    @ApiModelProperty(value = "课程通知次数")
    @TableField("course_nums")
    private Integer courseNums;

    @ApiModelProperty(value = "课程时间")
    @TableField("course_time")
    private Date courseTime;

    @ApiModelProperty(value = "备注")
    @TableField("course_remark")
    private String courseRemark;

    @ApiModelProperty(value = "课程举办地址")
    @TableField("course_address")
    private String courseAddress;

    @TableField("spread_url")
    private String spreadUrl;

    @ApiModelProperty(value = "推广码")
    @TableField("spread_code")
    private String spreadCode;

    @ApiModelProperty(value = "字典项：STATUS：{DISABLE：禁用，ENABLE：启用} ")
    @TableField("status")
    private String status;

    @ApiModelProperty(value = "字典项：COURSE_NOTICE_TYPE{MAN_NOTICE：人为通知；SYS_NOTICE:系统定时通知}")
    @TableField("notice_type")
    private String noticeType;

    @ApiModelProperty(value = "通知时间")
    @TableField("notice_time")
    private Date noticeTime;

    @ApiModelProperty(value = "创建者")
    @TableField(value = "create_user", fill = FieldFill.INSERT)
    private Long createUser;

    @ApiModelProperty(value = "创建时间")
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private Date createTime;

    @ApiModelProperty(value = "修改者")
    @TableField(value = "update_user", fill = FieldFill.INSERT_UPDATE)
    private Long updateUser;

    @ApiModelProperty(value = "修改时间")
    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;


    @Override
    protected Serializable pkVal() {
        return this.courseId;
    }

}
